{% extends "base.html" %}
{% block content %}
<table>
    <tr>
        <td><img src="{{ user.avatar() }}" alt=""></td>
        <td>
            <p>
                <b>{{ user.username }}</b>
                <p>
                    Follower {{ user.followers.count()}} Followering {{ user.followed.count() }}
                </p>
                <form action="" method="post">
                        {% if user != current_user %}
                        {% if current_user.is_following(user) %}
                        <input type="submit" name="request_button" value="Unfollow">
                        {% else %}
                        <input type="submit" name="request_button" value="Follow">
                        {% endif %}
                        {% endif %}
                </form>
            </p>
            {% if user.about_me %}
            <p>About me:{{ user.about_me }}</p>
            {% endif %}
            {% if user.create_time %}
            <p>Joined:{{ user.create_time }}</p>
            {% endif %}
            {% if user==current_user %}
            <p><a href="{{ url_for('edit_profile') }}">Edit your profile</a></p>
            {% endif %}
        </td>
    </tr>
</table>

{% include '_tweets.html' %}

    {% if prev_url %}
    <a href=" {{ prev_url }}">Prev Page</a>
    {% endif %}
    {% if next_url %}
    <a href=" {{ next_url }}">Next page</a>
    {% endif %}
{% endblock %}

